home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / bin / esd-config < prev    next >
Text File  |  2005-10-20  |  2KB  |  76 lines

  1. #!/bin/sh
  2.  
  3. audiofile_libs="-L/usr/lib -laudiofile -lm"
  4. audiofile_cflags=""
  5.  
  6. prefix=/usr
  7. exec_prefix=${prefix}
  8. exec_prefix_set=no
  9.  
  10. usage="\
  11. Usage: esd-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--libs] [--cflags]"
  12.  
  13. if test $# -eq 0; then
  14.       echo "${usage}" 1>&2
  15.       exit 1
  16. fi
  17.  
  18. while test $# -gt 0; do
  19.   case "$1" in
  20.   -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  21.   *) optarg= ;;
  22.   esac
  23.  
  24.   case $1 in
  25.     --prefix=*)
  26.       prefix=$optarg
  27.       if test $exec_prefix_set = no ; then
  28.         exec_prefix=$optarg
  29.       fi
  30.       ;;
  31.     --prefix)
  32.       echo $prefix
  33.       ;;
  34.     --exec-prefix=*)
  35.       exec_prefix=$optarg
  36.       exec_prefix_set=yes
  37.       ;;
  38.     --exec-prefix)
  39.       echo $exec_prefix
  40.       ;;
  41.     --version)
  42.       echo 0.2.36
  43.       ;;
  44.     --cflags)
  45.       if test ${prefix}/include != /usr/include ; then
  46.         includes=-I${prefix}/include
  47.         for i in $audiofile_cflags ; do
  48.           if test $i = -I${prefix}/include ; then
  49.             includes=""
  50.           fi
  51.         done      
  52.       fi
  53.       echo $includes $audiofile_cflags
  54.       ;;
  55.     --libs)
  56.       my_audiofile_libs=
  57.       libdirs=-L${exec_prefix}/lib
  58.       for i in $audiofile_libs ; do
  59.         if test $i != -L${exec_prefix}/lib ; then
  60.           if test -z "$my_audiofile_libs" ; then
  61.             my_audiofile_libs="$i"
  62.           else
  63.             my_audiofile_libs="$my_audiofile_libs $i"
  64.           fi
  65.         fi
  66.       done
  67.       echo $libdirs -lesd $my_audiofile_libs 
  68.       ;;
  69.     *)
  70.       echo "${usage}" 1>&2
  71.       exit 1
  72.       ;;
  73.   esac
  74.   shift
  75. done
  76.